package com.wish.housing.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wish.common.core.usconfig.common.MsgResult;
import com.wish.housing.entity.TbHouseStyle;
import com.wish.housing.service.ITbHouseStyleService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 高露雯-集中式房源-房型信息表 前端控制器
 * </p>
 *
 * @author gaoluwen
 * @since 2022-03-30
 */
@RestController
@RequestMapping("/tb-house-style")
public class TbHouseStyleController {
    @Autowired
    ITbHouseStyleService iTbHouseStyleService;
    @PostMapping("getTbHouseStyleList")
    public List<TbHouseStyle> getTbHouseStyleList(@RequestBody TbHouseStyle tbHouseStyle){
        QueryWrapper<TbHouseStyle> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("house_id",tbHouseStyle.getHouseId());
        List<TbHouseStyle> list = iTbHouseStyleService.list(queryWrapper);
        return list;
    }
}
